package com.zelix;

import java.awt.*;
import javax.swing.*;

// Referenced classes of package com.zelix:
//            eb, l1, zz, g2

public abstract class w1 extends JDialog
{

    protected static final String a;
    protected JFrame b;

    public w1(JFrame jframe, String s, boolean flag)
    {
        super(jframe, s, flag);
        b = jframe;
        eb eb1 = new eb(this);
        addWindowListener(eb1);
        d();
    }

    public final void a()
    {
        a(0, 0, true);
    }

    public final void a(int i, int j, boolean flag)
    {
        int k;
        int l;
label0:
        {
            Dimension dimension = getSize();
            if(flag)
            {
                Point point = b.getLocationOnScreen();
                Dimension dimension2 = b.getSize();
                k = (dimension2.width / 2 - dimension.width / 2) + point.x;
                l = (dimension2.height / 2 - dimension.height / 2) + point.y;
                k = Math.max(0, k) + i;
                l = Math.max(0, l) + j;
                if(!g2.b)
                    break label0;
            }
            Dimension dimension1 = Toolkit.getDefaultToolkit().getScreenSize();
            k = dimension1.width / 2 - dimension.width / 2;
            l = dimension1.height / 2 - dimension.height / 2;
            k = Math.max(0, k) + i;
            l = Math.max(0, l) + j;
        }
        setLocation(k, l);
        zz.a(this, true);
    }

    public final void a(boolean flag)
    {
        a(0, 0, flag);
    }

    public void b()
    {
        setVisible(false);
        dispose();
    }

    public Action c()
    {
        return new l1(this);
    }

    public void d()
    {
        Action action = c();
        KeyStroke keystroke = KeyStroke.getKeyStroke('\033');
        getRootPane().registerKeyboardAction(action, keystroke, 1);
        getRootPane().registerKeyboardAction(action, keystroke, 2);
    }

    private static String z(char ac[]) {
        for (int i = 0; i < ac.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key =0x51;
                    break;
                case 1:
                    key =26;
                    break;
                case 2:
                    key =37;
                    break;
                case 3:
                    key =53;
                    break;
                default:
                    key =92;
                    break;
            }
            ac[i] ^= key;
        }
        return new String(ac).intern();
    }

    static 
    {

        a = System.getProperty(z("=sKPr\"\177UT.0nJG".toCharArray()));
    }
}